package org.mspring.mlog.utils;

import org.mspring.platform.web.WebContext;

/**
 * @author Gao Youbo
 * @since 2012-7-23
 */
public class WebUtils extends org.springframework.web.util.WebUtils {

    /**
     * 获取对应文件系统的路径
     *
     * @return
     */
    public static final String getRealPath() {
        return WebContext.getInstance().getRealRootPath();
    }

    /**
     * 获取对应文件系统的路径
     *
     * @param path
     * @return
     */
    public static final String getRealPath(String path) {
        return WebContext.getInstance().getRealPath(path);
    }

    /**
     * 获取当前的contextpath
     *
     * @return
     */
    public static final String getContextPath() {
        return WebContext.getInstance().getContextPath();
    }

}
